package com.cc.blog.web.controller;

import com.cc.blog.common.annotation.ApiOperationLog;
import com.cc.blog.common.utils.Result;
import com.cc.blog.web.domain.dto.FindArchiveArticlePageListReqDTO;
import com.cc.blog.web.service.ArchiveService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author cc
 * @Date 2024/7/16 15:25
 */
@RestController
@Api(tags = "文章归档")
@AllArgsConstructor
public class ArchiveController {

    private final ArchiveService archiveService;

    @PostMapping("/archive/list")
    @ApiOperation(value = "获取文章归档分页数据")
    @ApiOperationLog(description = "获取文章归档分页数据")
    public Result findArchivePageList(@RequestBody FindArchiveArticlePageListReqDTO findArchiveArticlePageListReqDTO) {
        return archiveService.findArchivePageList(findArchiveArticlePageListReqDTO);
    }
}
